package com.world.lzh.service.impl;

import com.world.lzh.dao.UserDao;
import com.world.lzh.entity.User;
import com.world.lzh.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author lzh
 * @Date 2022/5/12 - 9:17
 * @Description
 * @Version 1.0.0
 **/
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao;

    @Override
    public String save(User user) {
        userDao.save(user);
        return "新增成功";
    }

    @Override
    public Object select(User user) {
        return userDao.findById(user.getId());
    }
}
